package com.chag.app.biz.dao.gen;

import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface ResumeMapper {
    int countByExample(ResumeCriteria example);

    int deleteByExample(ResumeCriteria example);

    @Delete({
        "delete from RESUME",
        "where RESUME_ID = #{resumeId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer resumeId);

    @Insert({
        "insert into RESUME (RESUME_ID, RESUME_NAME, ",
        "MEMBER_ID, UPDATE_TIME, ",
        "SALARY, BIRTHDAY, ",
        "AREA, GRADUATE_FROM, ",
        "GRADUATE_DATE, EDUCATION, ",
        "SELF_INTRO)",
        "values (#{resumeId,jdbcType=INTEGER}, #{resumeName,jdbcType=VARCHAR}, ",
        "#{memberId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, ",
        "#{salary,jdbcType=INTEGER}, #{birthday,jdbcType=TIMESTAMP}, ",
        "#{area,jdbcType=VARCHAR}, #{graduateFrom,jdbcType=VARCHAR}, ",
        "#{graduateDate,jdbcType=TIMESTAMP}, #{education,jdbcType=VARCHAR}, ",
        "#{selfIntro,jdbcType=VARCHAR})"
    })
    int insert(Resume record);

    int insertSelective(Resume record);

    List<Resume> selectByExample(ResumeCriteria example);

    @Select({
        "select",
        "RESUME_ID, RESUME_NAME, MEMBER_ID, UPDATE_TIME, SALARY, BIRTHDAY, AREA, GRADUATE_FROM, ",
        "GRADUATE_DATE, EDUCATION, SELF_INTRO",
        "from RESUME",
        "where RESUME_ID = #{resumeId,jdbcType=INTEGER}"
    })
    @ResultMap("BaseResultMap")
    Resume selectByPrimaryKey(Integer resumeId);

    int updateByExampleSelective(@Param("record") Resume record, @Param("example") ResumeCriteria example);

    int updateByExample(@Param("record") Resume record, @Param("example") ResumeCriteria example);

    int updateByPrimaryKeySelective(Resume record);

    @Update({
        "update RESUME",
        "set RESUME_NAME = #{resumeName,jdbcType=VARCHAR},",
          "MEMBER_ID = #{memberId,jdbcType=INTEGER},",
          "UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},",
          "SALARY = #{salary,jdbcType=INTEGER},",
          "BIRTHDAY = #{birthday,jdbcType=TIMESTAMP},",
          "AREA = #{area,jdbcType=VARCHAR},",
          "GRADUATE_FROM = #{graduateFrom,jdbcType=VARCHAR},",
          "GRADUATE_DATE = #{graduateDate,jdbcType=TIMESTAMP},",
          "EDUCATION = #{education,jdbcType=VARCHAR},",
          "SELF_INTRO = #{selfIntro,jdbcType=VARCHAR}",
        "where RESUME_ID = #{resumeId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Resume record);
}